# Maintainer: David Runge <dvzrv@archlinux.org>
# Contributor: speps <speps at aur dot archlinux dot org>

_name=REV-plugins
pkgname=rev-plugins
pkgver=0.8.1
pkgrel=2
pkgdesc="LADSPA stereo and ambisonic reverb plugin based on zita-rev1"
arch=(loong64 x86_64)
url="https://kokkinizita.linuxaudio.org/linuxaudio/ladspa/"
license=(GPL3)
groups=(
  ladspa-plugins
  pro-audio
)
depends=(
  gcc-libs
  glibc
  ladspa-host
)
makedepends=(ladspa)
source=(
  https://kokkinizita.linuxaudio.org/linuxaudio/downloads/$_name-$pkgver.tar.bz2
  $pkgname-0.8.1-makefile.patch
)
sha512sums=('1c5732099f1f7b345f0ba509aebc4820bdd93e7a5a8bf54c010da34b89f95a1a5d1aff1447020c0f52c5de05f11b1c8381adcf034d68a17b90235229ad6bcad6'
            'd3184a8d195cb1883827d36a757e81ff31fc5afacc8267ccc2dca35050321995564bb2ea8bce301d8aa4694d74c8501757851baaafd0ead1870dfe853a6b52b0')
b2sums=('01bad9b663fa3b4f49209a174486758c03945b8e97e455e01269213be885167fbec33e6ada251c6c18e03d78573494bd67ec3ad6d2860f7f159e73bb72bc4635'
        '51219951ad0a452a6ab6dfb5c37f4615d7ff3f28c82d704359d5bc4b895426c454bcd9ec85df7c7c08f2de3f83cb294573aa130639ae915da58665e8af7cfe83')

prepare() {
  # fix Makefile to honor LDFLAGS and DESTDIR
  patch -Np1 -d $_name-$pkgver -i ../$pkgname-0.8.1-makefile.patch
}

build() {
  make -C $_name-$pkgver/source
}

package() {
  make install DESTDIR="$pkgdir" -C $_name-$pkgver/source
  install -vDm 644 $_name-$pkgver/{AUTHORS,README} -t "$pkgdir/usr/share/doc/$pkgname/"
}
